package com.usian.wemedia.controller;

import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.media.dtos.WmUserDto;
import com.usian.wemedia.LoginControllerApi;
import com.usian.wemedia.service.WmUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/login")
@Api(value = "登录模块",tags = "登录")
public class WmLoginController implements LoginControllerApi {

    @Autowired
    private WmUserService wmLoginService;

    @Override
    @PostMapping("/in")
    @ApiOperation(value = "登录接口",notes = "输入用户名和密码")
    public ResponseResult login(@RequestBody WmUserDto adUserDto) {

        return wmLoginService.login(adUserDto);

    }
}
